<%layout("/common/layout.html"){%>

<div class="am-g am-g-fixed blog-g-fixed">

    <div class="am-u-md-8">

        <ol class="am-breadcrumb">
            <li><a href="#" class="am-icon-home">首页</a></li>
            <li><a href="#">分类</a></li>
            <li class="am-active">${category.name}</li>
        </ol>

        <%for(book in page.list!){%>

        <%if(book.type==0){%>
        <div class="am-panel am-panel-primary">
            <div class="am-panel-hd">出售</div>
            <%}else if(book.type==1){%>
            <div class="am-panel am-panel-warning">
                <div class="am-panel-hd">求购</div>
                <%}else{%>
                <div class="am-panel am-panel-success">
                    <div class="am-panel-hd">赠送</div>
                    <%}%>
                    <div class="am-panel-bd">
                        <div class="am-container">
                            <div class="am-u-md-6">

                                <img class="book-img" src="${book.img}" alt="书的图片"/>
                            </div>
                            <div class="am-u-md-6">
                                <h2>${book.name}</h2>

                                <p>By : <a href="${base}/user/info?user=${book.user.id}">${book.user.name}</a></p>
                                <a href="${base}/book?book=${book.id}" class="">查看详情</a>

                            </div>
                        </div>
                    </div>
                </div>

                <%}%>

            </div>


            <%include("/common/right.html"){}%>

        </div>

        <%}%>